package com.sinosoft.sm.system.role.dto;

import java.io.Serializable;

import com.sinosoft.sm.system.common.utils.ObjectUtil;
import com.sinosoft.sm.system.role.entity.UserRoleRefEntity;

public class UserRoleRefData implements Serializable{

	private static final long serialVersionUID = 1L;
	
	private String uid;  //用户标识
	
	private String roleid;  //角色标识

	public String getUid() {
		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public String getRoleid() {
		return roleid;
	}

	public void setRoleid(String roleid) {
		this.roleid = roleid;
	}
	
	/**
	 * 数据转换
	 * 实体类转传输类
	 * @param userEntity	角色实体数据
	 */
	public void toUserRoleRefData(UserRoleRefEntity userRoleRefEntity) {
		ObjectUtil.oldToNew(this, userRoleRefEntity, "serialVersionUID");
	}
	
	/**
	 * 数据转换
	 * 传输类转实体类
	 * @return	角色实体数据
	 */
	public UserRoleRefEntity touserRoleRefEntity() {
		UserRoleRefEntity userRoleRefEntity = new UserRoleRefEntity();
		ObjectUtil.oldToNew(userRoleRefEntity, this, "serialVersionUID");
		return userRoleRefEntity;
	}
}
